package com.woorigil.social.domain.category;

import java.util.List;

import org.springframework.stereotype.Repository;
import com.woorigil.social.domain.SqlMapDaoSupport;

@Repository
public class CategoryDao extends SqlMapDaoSupport<Category, Integer> {
	public static final String NAMESPACE = "Category";

	@Override
	public String getNamespace() {
		return NAMESPACE;
	}

	@SuppressWarnings("unchecked")
	public List<Category> search(CategoryCondition condition) {
		return getSqlMapClientTemplate().queryForList(getStatementName(NAMESPACE, "search"), condition);
	}

	@SuppressWarnings("unchecked")
	public List<Category> searchAll() {
		return getSqlMapClientTemplate().queryForList(getStatementName(NAMESPACE, "searchAll"));
	}
}